#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    vector<int> v;
    cout<<"vector size = "<<v.size()<<endl;
    int i;
    for(i=0;i<5;i++){
        v.push_back(i);
    }
    cout<<"vector size = "<<v.size()<<endl;
    vector<int>::iterator t=v.begin();
    while(t!=v.end()){
        cout<<"value of t = "<< *t <<endl;
        t++;
    }
    v.insert(v.begin()+2,-3);
    cout<<"v[2]="<<v.at(2)<<endl;
    v.erase(v.begin()+2);
    reverse(v.begin(),v.end());
    for(i=0;i<5;i++){
        cout<<v[i]<<' ';
    }
    cout<<endl;
    sort(v.begin(),v.end());
    for(i=0;i<5;i++){
        cout<<v[i]<<' ';
    }
    cout<<endl;
    v.clear();
    return 0;
}
